﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UIWindows.MESModels;

namespace XingLucifer.IBase.Models
{
    public class MESCollectionItemsParameterModel : INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;

        /// <summary>
        /// 选中的工单序号
        /// </summary>
        public string WorkOrderNumAdress { get; set; }
        /// <summary>
        /// 批次号
        /// </summary>
        public string PC_NoAddress { get; set; }
        /// <summary>
        /// 规格型号
        /// </summary>
        public string Material_SpecAddress { get; set; }

        /// <summary>
        /// 工号
        /// </summary>
        public string UserName { get; set; }

        /// <summary>
        /// 工号校验，0未校验，1校验成功，2校验失败
        /// </summary>
        public int HasValidEmployeeId { get; set; } = 0;
        /// <summary>
        /// 当前已经校验的工号
        /// </summary>
        public string HasValidUserName { get; set; } = null;
        /// <summary>
        /// 设备编码
        /// </summary>
        public string EquipmentCode { get; set; }
        /// <summary>
        /// 工序
        /// </summary>
        public string process_id { get; set; }
        /// <summary>
        /// 班次
        /// </summary>
        public string Class { get; set; }
        /// <summary>
        /// 班组
        /// </summary>
        public string ClassTeam { get; set; }
        /// <summary>
        /// 工单
        /// </summary>
        public string WorkOrder { get; set; }
        /// <summary>
        /// 批次
        /// </summary>
        public string BatchNo { get; set; }
        public string EmpNo { get; set; }
        /// <summary>
        /// 料号
        /// </summary>
        public string Material_Code { get; set; }
        /// <summary>
        /// 型号
        /// </summary>
        public string Material_Spec { get; set; }
        /// <summary>
        /// 工单状态
        /// </summary>
        public string WorkOrderStatus_Name { get; set; }
        /// <summary>
        /// 计划开始时间
        /// </summary>
        public string PlanedStart { get; set; }
        /// <summary>
        /// 计划结束时间
        /// </summary>
        public string PlanedEndDate { get; set; }
        /// <summary>
        /// 订单号
        /// </summary>
        public string ProductionOrderNO { get; set; }
        public List<MESGeneralDataReturnModel> GeneralData = new List<MESGeneralDataReturnModel>();
        /// <summary>
        /// 工单号列表
        /// </summary>
        public List<string> lstBill_No { get; set; }
        /// <summary>
        /// 料号列表
        /// </summary>
        public List<string> lstMaterial_Code { get; set; }
        /// <summary>
        /// 型号列表
        /// </summary>
        public List<string> lstMaterial_Spec { get; set; }
        /// <summary>
        /// 订单批号列表
        /// </summary>
        public List<string> lstPC_No { get; set; }
        /// <summary>
        /// 工单状态列表
        /// </summary>
        public List<string> lstWorkOrderStatus_Name { get; set; }
        /// <summary>
        /// 计划开始时间列表
        /// </summary>
        public List<string> lstPlanedStart { get; set; }
        /// <summary>
        /// 计划结束时间列表
        /// </summary>
        public List<string> lstPlanedEndDate { get; set; }
        /// <summary>
        /// 订单号列表
        /// </summary>
        public List<string> lstProductionOrderNO { get; set; }


        //设备状态
        public string MachineStatus { get; set; }

        /// <summary>
        /// 上次状态信息
        /// </summary>
        public Dictionary<int, List<MESEquipmentStatusModel>> last_StatusData = new Dictionary<int, List<MESEquipmentStatusModel>>();

        /// <summary>
        /// 上次待机原因编码
        /// </summary>
        public int last_recode { get; set; } = 0;

        /// <summary>
        /// 投入数量
        /// </summary>
       public int PutIntoNumber { get; set; }
        /// <summary>
        /// 合格数量
        /// </summary>
       public int QualifiedNumber { get; set; }
        /// <summary>
        /// 不合格数量
        /// </summary>
        public int UnqualifiedNumber { get; set; }


        /// <summary>
        /// 托盘码
        /// </summary>
        public string TrayBarcode { get; set; }
        /// <summary>
        /// 托盘码流水ID
        /// </summary>
        public long TrayBarcodeID { get; set; }



        /// <summary>
        /// 产品标志
        /// </summary>
        public string ProductMark { get; set; }
        /// <summary>
        /// 工步类型
        /// </summary>
        public string Steptype { get; set; }
        /// <summary>
        /// 工步号
        /// </summary>
        public string StepNumber { get; set; }

        public int InCount { get; set; } = 0;
        public int OKCount { get; set; } = 0;
        public int NGCount { get; set; } = 0;

    }
}
